let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n38,
                    i =
                    (this && this.__extends) ||
                    ((_n38 = function n(t, e) {
                            return (_n38 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n38(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.BattleScene = void 0);
                var r = t('AbsActor'),
                    a = t('MathUtils'),
                    s = (function(t) {
                        function e() {
                            var o = t.call(this) || this;
                            return (e._ins = o), o;
                        }
                        return (
                            i(e, t),
                            Object.defineProperty(e, 'ins', {
                                get: function get() {
                                    return this._ins;
                                },
                                enumerable: !1,
                                configurable: !0
                            }),
                            (e.prototype.getActorBy = function(t, e) {
                                for (var o = 0; o < this.actors.length; o++) {
                                    var n = this.actors[o];
                                    if (n.col == t && n.row == e) return n;
                                }
                                return null;
                            }),
                            (e.prototype.getTarget = function(t) {
                                var e = this.actors,
                                    o = [];
                                for (var n in e) {
                                    var i = e[n];
                                    i.camp != t.camp &&
                                        i.state != r.ActorState.Await &&
                                        i.state != r.ActorState.Appear &&
                                        i.hp > 0 &&
                                        o.push(i);
                                }
                                return o.length > 0 ?
                                    o[a.default.randomInt(0, o.length - 1)] :
                                    null;
                            }),
                            (e.prototype.sortActor = function() {
                                this._isSortActor = !0;
                            }),
                            (e.prototype.onUpdate = function(e) {
                                if ((t.prototype.onUpdate.call(this, e), this._isSortActor)) {
                                    for (
                                        var o = [], n = 100, i = 0, s = 0; s < this.actors.length; s++
                                    ) {
                                        (l = this.actors[s]).type == r.ActorType.Soldier &&
                                            (o.push(l),
                                                l.info.level < n && (n = l.info.level),
                                                l.info.level > i && (i = l.info.level));
                                    }
                                    var c = (60 / (i - n + 1)) * 0.5;
                                    for (s = 0; s < o.length; s++) {
                                        var l,
                                            u =
                                            ((l = o[s]).info.level - n + 1) * c -
                                            30 +
                                            a.default.randomFloat(-c, c);
                                        (l.entity.y = u),
                                        (l.entity.zIndex = a.default.getZIndex(-u));
                                    }
                                    this._isSortActor = !1;
                                }
                            }),
                            (e.prototype.onDestroy = function() {
                                (e._ins = null), t.prototype.onDestroy.call(this);
                            }),
                            e
                        );
                    })(t('GameScene').GameScene);
                (o.BattleScene = s), console.log("end");
            module.exports =  e.exports;